﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.ServiceProcess;

namespace WaveMaster.Holidays.Club.ServiceServer
{
    class ServiceServer : System.ServiceProcess.ServiceBase
    {
        private static EventLog evt = new EventLog("Application");
        public static string SVC_NAME = "WaveMaster Report Service Server.";

        public ServiceServer()
		{
			this.ServiceName=SVC_NAME;
		}

        static void Main(string[] args)
        {
            evt.Source = SVC_NAME;
            evt.WriteEntry("WaveMaster Service Inizializing...");
            ServiceBase.Run(new ServiceServer());
        }

		protected override void OnStart(string[] args)
		{
			string configName=AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
			System.Runtime.Remoting.RemotingConfiguration.Configure(configName, false);
            evt.WriteEntry("WaveMaster Report Service Started.", EventLogEntryType.Information);
		}

		protected override void OnStop()
		{
            evt.WriteEntry("WaveMaster Report Service Stopped.");
		}
    }
}
